﻿namespace SuiHan.Commons.Logging {
    public class LoggerConfig {
        /// <summary>
        /// 日志级别
        /// </summary>
        public LoggerLevel Level { get; set; } = LoggerLevel.INFO;

        /// <summary>
        /// 是否输出到控制台(Default=true)
        /// </summary>
        public bool ConsoleEnabled { get; set; } = true;

        /// <summary>
        /// 是否输出到文件(Default=false)
        /// </summary>
        public bool FileEnabled { get; set; }

        /// <summary>
        /// 若要输出到文件,还要设置LogWriter
        /// </summary>
        public LogFileWriter LogWriter { get; set; }

        /// <summary>
        /// 文件名
        /// </summary>
        public string FileFormat { get; set; }

        /// <summary>
        /// 设置输出目录
        /// </summary>
        public string OutDir { get; set; }

        /// <summary>
        /// 单个日志文件最大长度
        /// </summary>
        public long SigleFileMaxLength { get; set; }

        /// <summary>
        /// 输出日期格式
        /// </summary>
        public string DateFormat { get; set; } = "yyyy-M-d HH:mm.ss";
    }
}
